package com.yxy.model;


import lombok.Data;
import tk.mybatis.mapper.annotation.KeySql;
import tk.mybatis.mapper.code.ORDER;

import java.util.Date;
import java.math.BigDecimal;

import javax.persistence.*;


@Data
@Entity
@Table(name = "table_product_order_info",schema = "")
public class TableProductOrderInfo {

  //null
  @Id
  @KeySql(useGeneratedKeys = true,sql = "SELECT @@IDENTITY",order = ORDER.AFTER)
  @Column(name = "id")
  private Long id;

  //用户id
  @Column(name = "user_id")
  private Long userId;

  //用户姓名
  @Column(name = "user_name")
  private String userName;

  //用户账号
  @Column(name = "user_account")
  private String userAccount;

  //产品编码
  @Column(name = "pro_code")
  private String proCode;

  //产品名称
  @Column(name = "pro_name")
  private String proName;

  //商品规格
  @Column(name = "pro_unit")
  private String proUnit;

  //商品金额
  @Column(name = "pro_price")
  private BigDecimal proPrice;

  //合计金额
  @Column(name = "all_price")
  private BigDecimal allPrice;

  //购买数量
  @Column(name = "in_num")
  private Long inNum;

  //总金额
  @Column(name = "pro_total_price")
  private BigDecimal proTotalPrice;

  //订单进度 0未处理 1 已接单 2 已发货 3 在途中 4 已退货 5 已收货
  @Column(name = "buy_rate")
  private Long buyRate;

  //用户收获地址
  @Column(name = "user_address")
  private String userAddress;

  //标记数据状态 0 不显示 1显示
  @Column(name = "status")
  private Long status;

  //数据备注
  @Column(name = "misc")
  private String misc;

  //创建者id
  @Column(name = "create_user_id")
  private Long createUserId;

  //创建人姓名
  @Column(name = "create_user_name")
  private String createUserName;

  //创建时间
  @Column(name = "create_date")
  private Date createDate;

  //修改人id
  @Column(name = "update_user_id")
  private Long updateUserId;

  //修改人姓名
  @Column(name = "update_user_name")
  private String updateUserName;

  //更新时间
  @Column(name = "update_date")
  private Date updateDate;


  //联系人
  @Column(name = "link_name")
  private String linkName;

  //联系电话
  @Column(name = "link_tel")
  private String linkTel;


  //varchar预留字段1
  @Column(name = "param1")
  private String param1;

  //预留字段2
  @Column(name = "param2")
  private Long param2;

  //预留字段3
  @Column(name = "param3")
  private BigDecimal param3;

  //物流单号
  @Column(name = "tracking_number")
  private String trackingNumber;

  //退款原因
  @Column(name = "reason_return")
  private String reasonReturn;


  @Transient
  private  String proUrl;




}
